StupidBeauty
Read times:639Posted at:Fri Jun 28 05:08:33 2013
- no title specified

转载通过AudioManager 设置调整系统各项音量(铃声 媒体等)

可使用AudioManager来让系统静音。

http://www.pocketdigi.com/20110717/398.html

亮点:

首先是步进的方法:
public void adjustStreamVolume (int streamType, int direction, int flags)

1

am.adjustStreamVolume (AudioManager.STREAM_MUSIC, AudioManager.ADJUST_RAISE, AudioManager.FLAG_SHOW_UI ) ;

解释一下三个参数
第一个streamType是需要调整音量的类型,这里设的是媒体音量,可以是:
STREAM_ALARM 警报
STREAM_MUSIC 音乐回放即媒体音量
STREAM_NOTIFICATION 窗口顶部状态栏Notification,
STREAM_RING 铃声
STREAM_SYSTEM 系统

短裙诱惑

Your opinions
Your name:Email:Website url:Opinion content:
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4